
<button type="button" onClick="top.location='changepsw.php';">
		修改密码
</button>
 <?php

include ("global.php");
echo "cookies : </br>";

print_r($_COOKIE);

$date_now = date("Y-m-d H:i:s");
$sql = "select * from list where (start < '$date_now')AND('$date_now'<end)   ";
$result = $db->query($sql, $type = '');

print("当前需要提交的作业:</br>");

echo "<table Border=1 Cellpadding=1 Cellspacing=1>";
while ($row = mysql_fetch_array($result)){
	
	echo "<tr><td>".$row["description"]."</td>";
	echo "<td>截至日期:".$row["end"]."</td>";
	echo "<td>备注".$row["remarks"]."<td></tr>";
}
echo "<table/>";





if (is_uploaded_file($_FILES['upfile']['tmp_name'])) {

	$upfile = $_FILES["upfile"];
	$name = $upfile["name"];
	$type = $upfile["type"];
	$size = $upfile["size"];
	$tmp_name = $upfile["tmp_name"];
	$error = $upfile["error"];

	//类型控制
	switch ($type) {
		//	case 'image/pjpeg' : $ok=1;
		//		break;
		//	case 'image/jpeg' : $ok=1;
		//		break;
		//	case 'image/gif' : $ok=1;
		//		break;
		//	case 'image/png' : $ok=1;
		//		break;
		case 'application/x-rar-compressed' :
			$ok = 1;
			break;
		case 'application/msword' :
			$ok = 1;
			break;

		case 'application/zip' :
			$ok = 1;
			break;
	}

	$ok = 1;
	if ($ok && $error == '0') {
		move_uploaded_file($tmp_name, $upload_path . $name);
		echo "上传成功";
	}
}
?>

<form action="" enctype="multipart/form-data" method="post" name="upform">
  上传文件:
  <input name="upfile" type="file">
  <input type="submit" value="上传"><br>
 </form>

 																									